<%@ page import="cqcvc.edu.cn.dao.HouseDao" %>
<%@ page import="cqcvc.edu.cn.entity.HouseInfo" %><%--
  Created by IntelliJ IDEA.
  User: zhouyz
  Date: 2023/1/4
  Time: 11:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<jsp:include page="../index/index-header.jsp"></jsp:include>
<body>
<div ng-controller="activeInfoCtrl">
    <jsp:useBean id="house" class="cqcvc.edu.cn.entity.HouseInfo" scope="session"></jsp:useBean>
    <%
        HouseDao hd = new HouseDao();
        String houseId = request.getParameter("id");
        if (houseId != null && !"".equals(houseId)) {
            HouseInfo hi = hd.findById(Long.parseLong(houseId));
            house.setHousePic(hi.getHousePic());
            house.setHouseTitle(hi.getHouseTitle());
            house.setHouseDetail(hi.getHouseDetail());
            house.setHousePrice(hi.getHousePrice());
            house.setId(hi.getId());
        }
    %>
    <div class="row" style="margin-bottom: 15px">
        <div class="col-xs-12">
            <div style="text-align: center;font-size: 24px;">房型信息如下</div>
            <img id="house_pic"
                 src="images/houseShowPic?id=<jsp:getProperty name="house" property="id"></jsp:getProperty>" alt=""
                 style="width: 800px" ng-if="data.id" class="center-block"/>
        </div>
    </div>
    <br/>
    <div class="container">
        <dl class="dl-horizontal">
            <dt>
                房间名称：
            </dt>
            <dd>
                <jsp:getProperty name="house" property="houseTitle"/>
            </dd>
        </dl>
        <dl class="dl-horizontal">
            <dt>
                房间价格：
            </dt>
            <dd>
                <jsp:getProperty name="house" property="housePrice"/>
            </dd>
        </dl>
        <dl class="dl-horizontal">
            <dt>
                房间描述：
            </dt>
            <dd>
                <jsp:getProperty name="house" property="houseDetail"/>
            </dd>
        </dl>
    </div>
</div>
<jsp:include page="../index/index-foot.jsp"></jsp:include>
</body>
</html>
